<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    function getMax(a, b) {
      let max = 0
      max = a > b ? a : b
      return max;
    }
    function getMin(c, d) {
      let min = 0
      min = c < d ? c : d
      return min;
    }
    getMax(10, 100)
    getMin(1, 10000)
    function getMax(arr = []) {
      let max = 0
      for (let i = 0; i < arr.length; i++) {
        max = max > arr[i] ? max : arr[i]
      }
      return max;
    }
    function getMin(arr = []) {
      let min = 0
      for (let i = 0; i < arr.length; i++) {
        min = min < arr[i] ? min : arr[i]
      }
      return min;
    }
    function get(arr = []) {
      let max = 0;
      let min = 0;
      for (let i = 0; i < arr.length; i++) {
        max = max > arr[i] ? max : arr[i]
        min = min < arr[i] ? min : arr[i]
      }
      return max;
      return min;
    }
    getMax([1, 2, 5, 65, 345, 23, 22])
    getMin([32, 45, 12, 66, 33])
  </script>
</body>

</html>